import Vue from 'vue'
/** 
 * 医院管理服务
 */
export default {
  /**
   * 添加医院
   * @param {*} params 
   * @param {*} config 
   */
  async addHospital(params = {}, config = {}) {
    let result = await Vue.http.post('/Hospital/AddHospital', params, config);
    return result;
  },
  /**
   * 修改医院
   * @param {*} params 
   * @param {*} config 
   */
  async updateHospital(params = {}, config = {}) {
    let result = await Vue.http.put('/Hospital/UpdateHospital', params, config);
    return result;
  },
  /**
   * 删除医院
   * @param {*} params 
   * @param {*} config 
   */
  async deleteHospital(params = {}, config = {}) {
    config.params = params;
    let result = await Vue.http.delete('/Hospital/DeleteHospitalList', config);
    return result;
  },
  /**
   * 获取医院列表，带分页
   * @param {*} [params={}]
   * @param {*} [config={}]
   * @returns
   */
  async getHospitalList(params = {}, config = {}) {
    let result = await Vue.http.put('/Hospital/GetHospitalList', params, config);
    return result;
  },
  /**
   * 通过医师编号获取挂职医院
   *
   * @param {*} [params={}]
   * @param {*} [config={}]
   * @returns
   */
  async getHospitalListByDoctor(params = {}, config = {}) {
    config.params = params;
    let result = await Vue.http.get('/Hospital/GetHospitalListByDoctor', config);
    return result;
  }
}
